﻿<UserControl x:Class="ViewSwitchingNavigation.Contacts.Views.ContactDetailView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" >

    <UserControl.Resources>
        <DataTemplate x:Key="ContactDetailTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <TextBlock Text="{Binding Name}" FontWeight="Bold" FontSize="14"
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>

                <TextBlock Text="Company" Foreground="#FF525252"
                           Grid.Row="1" Grid.Column="0" Margin="0,0,15,0"/>
                <TextBlock Text="{Binding Company}"
                           Grid.Row="1" Grid.Column="1"/>

                <TextBlock Text="E-mail" Foreground="#FF525252"
                           Grid.Row="2" Grid.Column="0" Margin="0,0,15,0"/>
                <TextBlock Text="{Binding EmailAddress}"
                           Grid.Row="2" Grid.Column="1"/>

                <TextBlock Text="Address" Foreground="#FF525252"
                           Grid.Row="3" Grid.Column="0" Margin="0,0,15,0"/>
                <TextBlock Text="{Binding Address}"
                           Grid.Row="3" Grid.Column="1"/>

            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <ContentControl Content="{Binding}" ContentTemplate="{StaticResource ContactDetailTemplate}"/>
    </Grid>
</UserControl>
